Cannot import any portion of a fixed-width text file due to wrong format.The file to be imported does not meet the import requirements of Access 7.0. To import a fixed-width text file to an Access 7.0 database, each record in the file must be on a separate line, and all the records must contain the same number of characters. This is by design of Microsoft Access 7.0. Modify the text file to make sure that all records meet the requirements and then re-import the text file. 1) In the text file, make sure each record is on a different line. 2) Make sure each record contains the same number of characters. 3) Import the text file again: a) If the destination database (the database to which to import a text file) is not already open, open the database. b) If the Database window is not active, activate the Database window. c) Select the 'File' menu and select 'Get External Data'. (A submenu appears.) d) Select 'Import...' from the submenu. (The Import dialog box appears.) e) Select 'Text Files (*.txt, *.csv, *.tab, *.asc)' from the 'Files of type' drop-down list. f) Select the drive where the text file is located from the 'Look in' drop-down list. g) Select the folder that contains the file from the 'Look in' list box. (The text file is displayed.) NOTE: If the file is in a subfolder, continue selecting folders until the desired file is displayed. h) Select the text file. (The file is highlighted.) i) Choose the 'Import' button. (The Text Import Wizard appears.) < j) Select the 'Fixed Width' button. < k) Choose the 'Next' button. l) Click on the desired place to separate fields in the text file. (A line with an arrow appears.) m) Repeat Step 3)l) to insert arrow lines between every two fields. < NOTE: The size of a field can be adjusted by dragging the line. Each unit in the ruler in the middle of the dialog box stands for a character. Double-click on the line to remove it. n) Choose the 'Next' button. o) Specify where the imported data is to be stored: 1] Select the 'In a New Table' button to store the data in a new table. 2] Select the 'In an Existing Table' button and select the table from the drop-down list next to the button. NOTE: This option appends the data to an existing table. Select this option ONLY if the field names in the text file exactly match those in the existing table or if their column orders are the same. < p) Choose the 'Next' button. q) If the data is stored in a new table, do the following: 1] (Optional) Customize fields in the text file: < a] Select the field from the list box at the bottom of the 'Text Import Wizard' dialog box. b] Do one or both of the following in the 'Field Options' group: 1} Change the name of the field in the 'Field Name' box. 2} Select one of the following indexing options from the 'Indexed' drop-down list: a} Select 'No' to not index the field. b} Select 'Yes (Duplicates OK)' to index the field and allow duplicates. c} Select 'Yes (No duplicates)' to index the field without duplicates. c] Check the 'Do not import field (Skip)' check box to not import the selected field. 2] Choose the 'Next' button. 3] Do one of the following: a] Select the 'Let Access add Primary Key' button to have Access set the primary key for the imported text file. b] Select the 'Choose my own Primary Key' button and select the field to be used as the primary key from the drop-down list next to the button. c] Select the 'No Primary Key' button to not set any primary key. < 4] Choose the 'Next' button. r) Enter the name of the new table in the 'Import to Table' box. NOTE: If the 'In an Existing Table' button is selected in Step 14)a), the name of the existing table automatically displays in the box. < s) Choose the 'Finish' button to start the import process. (A message displays when the import is complete.) t) Choose 'OK' to close the Text Import Wizard. u) Make sure the data types or other field properties assigned by Access are correct: 1] Open the table in Design view. 2] Click in each imported field to check the data type or other field properties. Knowledge-Pak Desktop Suite (TM) Edition 5 Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved. Subject to the terms set forth in the end-user license agreement. All rights reserved. |